$(".header").load("header_con.html");
$(".footer").load("footer.html");

Vue.component('todo-item', {
	props: ['todo'],
	template: '<li class="city"><span>{{todo.t}}</span><a href="###">{{todo.t0}}</a><a href="###">{{todo.t1}}</a><a href="###">{{todo.t2}}</a><a href="###">{{todo.t3}}</a><a href="###">{{todo.t4}}</a><a href="###">{{todo.t5}}</a><a href="###">{{todo.t6}}</a><a href="###">{{todo.t7}}</a><a href="###">{{todo.t8}}</a><a href="###">{{todo.t9}}</a><a href="###">{{todo.t10}}</a><a href="###">{{todo.t11}}</a><a href="###">{{todo.t12}}</a><a href="###">{{todo.t13}}</a><a href="###">{{todo.t14}}</a><a href="###">{{todo.t15}}</a><a href="###">{{todo.t16}}</a><a href="###">{{todo.t17}}</a><a href="###">{{todo.t18}}</a><a href="###">{{todo.t19}}</a><a href="###">{{todo.t20}}</a><a href="###">{{todo.t21}}</a><a href="###">{{todo.t22}}</a></li>'
})
var app7 = new Vue({
	el: '#app-7',
	data: {
		groceryList: [{
			t:"A",
			t0: "阿拉善",
			t1: "鞍山",
			t2: "安庆",
			t3: "安阳",
			t4: "阿坝藏族羌族",
			t5: "安顺",
			t6: "阿里",
			t7: "安康",
			t8: "阿克苏"
		}, {
			t:"B",
			t0: "北京",
			t1: " 保定",
			t2: " 包头",
			t3: "巴彦淖尔",
			t4: "本溪",
			t5: "白山",
			t6: "白城",
			t7: "蚌埠"
		}, {
			t:"C",
			t0: "承德",
			t1: "沧州",
			t2: "长治",
			t3: "赤峰",
			t4: "朝阳",
			t5: "长春",
			t6: "常州",
			t7: "滁州"
		}, {
			t:"D",
			t0: "大同",
			t1: "大连",
			t2: "丹东",
			t3: "大庆",
			t4: "大兴安岭",
			t5: "东营",
			t6: "德州",
			t7: "东莞"
		}, {
			t:"E",
			t0: "鄂尔多斯",
			t1: "鄂州",
			t2: "恩施"
		}, {
			t:"F",
			t0: "抚顺",
			t1: "阜新",
			t2: "阜阳",
			t3: "福州",
			t4: "抚州",
			t5: "佛山",
			t6: "防城港",
			t7: "凤凰"
		}, {
			t:"G",
			t0: "赣州",
			t1: "广州",
			t2: "桂林",
			t3: "贵港",
			t4: "贵阳",
			t5: "甘南藏族",
			t6: "果洛藏族",
			t7: "固原"
		}, {
			t:"H",
			t0: "邯郸",
			t1: "衡水",
			t2: "呼和浩特",
			t3: "呼伦贝尔",
			t4: "葫芦岛",
			t5: "哈尔滨",
			t6: "鹤岗"
		}, {
			t:"J",
			t0: "晋城",
			t1: "晋中",
			t2: "锦州",
			t3: "吉林",
			t4: "鸡西",
			t5: "佳木斯",
			t6: "嘉兴",
			t7: "金华"
		}, {
			t:"K",
			t0: "开封",
			t1: "昆明",
			t2: "克拉玛依",
			t3: "喀什",
			t4: "昆山",
			t5: "开县",
			t6: "奎屯",
			t7: "库尔勒"
		}, {
			t:"L",
			t0: "廊坊",
			t1: "临汾",
			t2: "吕梁",
			t3: "辽阳",
			t4: "辽源",
			t5: "连云港",
			t6: "丽水",
			t7: "六安"
		}, {
			t:"M",
			t0: "牡丹江",
			t1: "马鞍山",
			t2: "茂名",
			t3: "梅州",
			t4: "绵阳",
			t5: "眉山",
			t6: "满洲里",
			t7: "明光"
		}, {
			t:"N",
			t0: "南京",
			t1: "南通",
			t2: "宁波",
			t3: "南平",
			t4: "宁德",
			t5: "南昌",
			t6: "南阳",
			t7: "南宁"
		}, {
			t:"P",
			t0: "盘锦",
			t1: "莆田",
			t2: "平顶山",
			t3: "濮阳",
			t4: "攀枝花",
			t5: "平凉",
			t6: "萍乡",
			t7: "普洱"
		}, {
			t:"Q",
			t0: "秦皇岛",
			t1: "齐齐哈尔",
			t2: "七台河",
			t3: "泉州",
			t4: "青岛",
			t5: "清远",
			t6: "钦州",
			t7: "黔西南"
		}, {
			t:"R",
			t0: "日照",
			t1: "日喀则",
			t2: "瑞安"
		}, {
			t:"S",
			t0: "石家庄",
			t1: "朔州",
			t2: "沈阳",
			t3: "四平",
			t4: "双鸭山",
			t5: "绥化",
			t6: "上海",
			t7: "苏州"
		}, {
			t:"T",
			t0: "天津",
			t1: "唐山",
			t2: "太原",
			t3: "通辽",
			t4: "铁岭",
			t5: "通化",
			t6: "泰州",
			t7: "台州"
		}, {
			t:"W",
			t0: "乌海",
			t1: "乌兰察布",
			t2: "无锡",
			t3: "温州",
			t4: "芜湖",
			t5: "潍坊",
			t6: "威海",
			t7: "武汉"
		}, {
			t:"X",
			t0: "邢台",
			t1: "忻州",
			t2: "兴安",
			t3: "锡林郭勒",
			t4: "徐州",
			t5: "宣城",
			t6: "厦门",
			t7: "新余"
		}, {
			t:"Y",
			t0: "阳泉",
			t1: "运城",
			t2: "营口",
			t3: "延边朝鲜族",
			t4: "伊春",
			t5: "盐城",
			t6: "扬州",
			t7: "鹰潭",
			t8: "宜春"
		}, {
			t:"Z",
			t0: "张家口",
			t1: "镇江",
			t2: "舟山",
			t3: "漳州",
			t4: "淄博",
			t5: "枣庄",
			t6: "郑州",
			t6: "周口"
		}]
	}
})
$(".city span").mouseenter(function(){
	$(this).css({
		color:"white",
		backgroundColor:"blue"
	})
})
$(".city span").mouseleave(function(){
	$(this).css({
		color:"black",
		backgroundColor:"white"
	})
})
$("a").click(function(){
	$(".sc_top1>li:nth-child(1)").find("span").eq(1).text($(this).text());
	$(".sc_top1>li:nth-child(3)").find("span").eq(1).text($(this).text());
	localStorage.nowCity=$(this).text();
	console.log($(this).text());
	//	 首页的城市
	if(localStorage.getItem("nowCity")==""||localStorage.getItem("nowCity")==null){
		$(".hcity").text("");
		console.log("11");
	}else{
		console.log(localStorage.getItem("nowCity"));
		$(".hcity").text(localStorage.getItem("nowCity"));
	}
	window.location="index.html";
})

